package com.dong.combinationMode.service.engine.impl;

import com.dong.combinationMode.model.aggregates.TreeRich;
import com.dong.combinationMode.model.vo.EngineResult;
import com.dong.combinationMode.model.vo.TreeNode;
import com.dong.combinationMode.service.engine.EngineBase;

import java.util.Map;

/**
 * @author DongJiaQi
 * @create 2023/1/5 13:49
 * @Description:
 */
public class TreeEngineHandleImpl extends EngineBase {
    @Override
    public EngineResult process(Long treeId, String userId, TreeRich treeRich, Map<String, String> decisionMatter) {
        TreeNode treeNode = engineDecisionMaker(treeRich, treeId, userId, decisionMatter);
        return new EngineResult(userId, treeId, treeNode.getTreeNodeId(), treeNode.getNodeValue());

    }
}
